<meta charset="UTF-8">
  <div class="content-wrapper" style='height: 100%;'>
    <section class="content-header">
      <h1 style="text-align:center;margin: -5px 0px 5px 0px;position: relative;" ng-click='checkResult()'>
        	菜谱计划
      </h1>
      <!--<button style='position: absolute;top: 10px;right: 2%;'>菜谱复制</button>-->
      <div ng-click='resultTotalExport()' style='position: absolute;top: 5px;right: 19%; margin-right: 2%;height: 35px;line-height: 35px;background-color:#bbbbbb;color: #fff;font-size: 16px;
					cursor: pointer;width: 80px;text-align: center;border-radius: 3px;' > 
					 导出
				 </div> 
      <div style='position: absolute;top: 5px;right: 10%; margin-right: 2%;height: 35px;line-height: 35px;background-color:#f39c12;color: #fff;font-size: 16px;
					cursor: pointer;width: 80px;text-align: center;border-radius: 3px;' ng-click='openCheck()'> 
					 菜谱核查   
				</div>
      <div style='position: absolute;top: 5px;right: 1%; margin-right: 2%;height: 35px;line-height: 35px;background-color:#37C8D2;color: #fff;font-size: 16px;
					cursor: pointer;width: 80px;text-align: center;border-radius: 3px;' ng-click='planCopy()'>
					菜谱复制 
				</div>
    </section>
    <div style='background: transparent;width: 98%;margin: 0px 1%;height: 90%;position: relative;'>
    	
	    <div  style='background-color: #23b7e5;height: 50px;color: #fff;border-radius: 3px 3px 0 0;margin: 0;width:100%;'>
	    		<img ng-click='upperWeek()' src='../imgs/leftarrow.png' style='width: 30px;position: absolute;top: 10px;left: 1%;cursor: pointer;'/>
	    		<img ng-click='nextWeek()' src='../imgs/rightarrow.png' style='width: 30px;position: absolute;top: 10px;left: 3%;cursor: pointer;'/>
	    		<span ng-click='goToToday()' class='today' style='cursor: pointer;'>今天</span>
	    		<span class='timeDistance'>{{rangeStartDate}}&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;{{rangeEndDate}}</span>
	    		
	    </div>
	    				<ul class='myul' >
	    						<li >
	    							<label>周一{{weekOne}}</label> 
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[0].pointed_date)}" ng-click='showMenu(menus[0].pointed_date,menu.period_time_id,menu.id,menu.end_time)'  ng-repeat='menu in menus[0]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周二{{weekTwo}}</label>
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[1].pointed_date)}" ng-click='showMenu(menus[1].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[1]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周三{{weekThree}}</label> 
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[2].pointed_date)}" ng-click='showMenu(menus[2].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[2]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周四{{weekFour}}</label>
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[3].pointed_date)}" ng-click='showMenu(menus[3].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[3]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周五{{weekFive}}</label> 
	    							<ul> 
	    								<li ng-class="{dateActive: isDate(menus[4].pointed_date)}" ng-click='showMenu(menus[4].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[4]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周六{{weekSix}}</label>
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[5].pointed_date)}" ng-click='showMenu(menus[5].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[5]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    						<li>
	    							<label>周日{{weekSeven}}</label>
	    							<ul>
	    								<li ng-class="{dateActive: isDate(menus[6].pointed_date)}" ng-click='showMenu(menus[6].pointed_date,menu.period_time_id,menu.id,menu.end_time)' ng-repeat='menu in menus[6]'>
	    									<label>{{menu.period_time_name}}</label>
	    									<p>
	    										<span ng-repeat='item in menu.items'>{{item.name}},</span>
	    									</p>
	    								</li>
	    							</ul>
	    						</li>
	    				</ul>
	    				
	    				<!--<div style='position: fixed;z-index: 1000;width: 80%;height:80% ;overflow: auto;'>-->
	    				<table id='resultExport' cellpadding="3" cellspacing="0"  border="1"  rull="all" 
	    					style='border-collapse: collapse;top:0px;left:0px;position: fixed;z-index: -1000;width: 80%;height: 80%;border: 1px solid #CCCCCC;border: 1px solid #888888;background-color: #ccc;'>
								<tr>
	    						<td style='width: 10%;' colspan="{{oneLineNum}}">{{excelTableName}}</td>
	    					</tr>
	    					<tr>
	    						<td style='width: 10%;'>日期</td>
	    						<td style='width: 10%;'>餐别</td>
	    						<td style='width: 10%;' ng-repeat='class in classify'>{{class.name}}</td>
	    						<td style='width: 10%;' ng-repeat='type in totalTypes'>{{type}}</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[0] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[0].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify '>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[0][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[1] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[1].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[1][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[2] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[2].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[2][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[3] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[3].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[3][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[4] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[4].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[4][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[5] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[5].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[5][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    					<tr ng-repeat='menu in menus[6] track by $index'>
	    						<td rowspan="{{periodNum}}" ng-if='$index == 0'>{{menus[6].dateFormat}}</td>
	    						<td >{{menu.period_time_name}}</td>
	    						<td ng-repeat='class in classify'>
	    							<span ng-repeat='item in menu.items' ng-if='menu.items != null && menu.items.length > 0 && item.categoryId == class.id'>{{item.name}},</span>
	    						</td>
	    						<td ng-repeat = 'audit in itemAndAudit[6][$index] track by $index'>
	    							<span ng-repeat='a in  audit track by $index' >"{{a}}"<span ng-if='!$last'>,</span></span>
	    						</td>
	    					</tr>
	    				</table>
	    		<!--</div>-->
	    
    </div> 
</div>
<!--菜谱模板modal-->  
	<div class="modal fade" id="menuEdit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='width: 90%;height: 100%;margin-top: 100px;    padding-bottom: 20px;'>
    <div class="modal-content" style='position: relative;height: auto;'>
    	<div ng-show='judgeDate' style='z-index: 2000;opacity:0.2;position: absolute;width: 100%;margin-top: 121px;
    height: calc(100% - 121px - 77px);background-color: #000;' ></div>
      <div class="modal-header" style='background-color: #3A3F51;color: #fff;'>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">菜谱编辑</h4>
      </div>
      <div class='classify' >
      		<div id='leftTmeple'  ng-click='clickShowleft()' class='classify_div div_active' style='margin-right: -2px;cursor: pointer;'>
      				基础信息
      		</div>
      		<div id='rightTmeple' ng-click='clickShowright()' class='classify_div' style='margin-left: -3px;cursor: pointer;'>
      				菜肴管理
      		</div>
      </div>
      
      <div id='box1' class="modal-body form-horizontal" style='height: 400px;padding: 0px;margin: 0px 15px;border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-radius: 0px 0px 5px 5px;'>
        <div class="box-body" >
        	<form class="form-horizontal">
                <div class="box-body">
                		<div class="form-group">
				               <label class="col-sm-3 control-label" style='width: 20%;text-align: left;'>就餐时间</label>
				               <div class="col-sm-4" style='width: 30%;'>
				                  <!--<input type="text" class="form-control" ng-model="newPeriod.book_start_time">-->
									            <div class="bootstrap-timepicker">
												<div class="bootstrap-timepicker-widget dropdown-menu">
													<table><tbody><tr><td><a href="#" data-action="incrementHour"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-up"></i></a></td></tr><tr><td><span class="bootstrap-timepicker-hour">03</span></td> <td class="separator">:</td><td><span class="bootstrap-timepicker-minute">15</span></td> <td class="separator">&nbsp;</td><td><span class="bootstrap-timepicker-meridian">PM</span></td></tr><tr><td><a href="#" data-action="decrementHour"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-down"></i></a></td></tr></tbody></table></div>
									                <div class="form-group">
									                  <div class="input-group" style="padding-left: 15px;">
									                    <input id='time1' type="text" class="form-control timepicker col-sm-4" ng-model="newPeriod.start_time" ng-required='true'>
									
									                 </div>
									                </div>
									              </div>
				               </div>
				               <label class="col-sm-1 control-label" style='width: 10%;text-align: left;'>至</label>
				                  <!--<input type="text" class="form-control" ng-model="newPeriod.book_end_time">-->
					                <div class="col-sm-4" style='width: 30%;'>
					                  	<div class="bootstrap-timepicker">
																<div class="bootstrap-timepicker-widget dropdown-menu">
																	<table><tbody><tr><td><a href="#" data-action="incrementHour"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-up"></i></a></td></tr><tr><td><span class="bootstrap-timepicker-hour">03</span></td> <td class="separator">:</td><td><span class="bootstrap-timepicker-minute">15</span></td> <td class="separator">&nbsp;</td><td><span class="bootstrap-timepicker-meridian">PM</span></td></tr><tr><td><a href="#" data-action="decrementHour"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-down"></i></a></td></tr></tbody></table></div>
											                <div class="form-group">
											                  <div class="input-group" style="padding-left: 20px;">
											                    <input id='time2' type="text" class="form-control timepicker col-sm-4" ng-model="newPeriod.end_time" ng-required='true'>
											
											                 </div>
											                </div>
					              			</div>
					              </div>
           				 </div>
                	
                	  <div class="form-group">
                        <label class="col-sm-3 control-label" style='width: 20%;text-align: left;'>就餐前</label>	
                        <div class="input-group" style="padding-left: 15px;display: inline-block;">
				                     <input type='number' id='reserve'  style='height: 30px;width:157px ;' ><!--onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"-->
				                 </div>
				                 <label class="col-sm-3 control-label" style='width: 20%;text-align: left;float: none;'>小时结束预定</label>	
				               		<!--<span>小时结束预定</span>-->
                     </div>   
                     
                     <div class="form-group">
                        <label class="col-sm-3 control-label" style='width: 20%;text-align: left;'>就餐前</label>	
                        <div class="input-group" style="padding-left: 15px;display: inline-block;">
				                     <input type='number' id='chargeback'  style='height: 30px;width:157px ;' ><!--onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"-->
				                 </div>
				                 <label class="col-sm-3 control-label" style='width: 20%;text-align: left;float: none;'>小时结束退订</label>	
                     </div>    
                        
                      <div class="form-group">
                        <label class="col-sm-2 control-label"style='text-align: left;'>常用模板</label>
                        <div class="col-sm-3">
                            <select ng-options='temple.id as temple.name for temple in templates' class="form-control" ng-model="template_id" ng-change="templeChange()">
                            </select>
                        </div>
                          <label class="col-sm-7 control-label" style='text-align: left;color: red;'>修改模板后，菜肴将重置成所选模板拥有的菜肴</label>
                    </div> 
                       
                        <div class="form-group">
                        <label class="col-sm-2 control-label" style='text-align: left;'>已选菜肴</label>
                        <div class="col-sm-10"><!--readonly="" -->
                            <textarea id='dishText' rows="5" class="form-control"  style="resize:none" readonly>
                            	
                            </textarea>
                        </div>
                    </div>
                </div>
                </form>
	   		 </div>
      </div>
      
      <div id='box2' class="modal-body form-horizontal" style='padding: 1% 0px 0px 2% !important;height: auto;padding: 0px;margin: 0px 17px 0px 15px;border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-radius: 0px 0px 5px 5px;display: none;'>
      		<div style='width: 96%;height: auto;margin: 0px 2%;font-size: 16px;display: inline-block;'>
      			<div style='width: 100%;height: 40px;'>
      				<input type="text" style='width: 46%;float: left;left: 0px;margin: 0px;' ng-model='cardInfor' class='goods' placeholder="菜品查询"/>
      				<button ng-click='toggleSaixuan()' style='height: 30px;float: right;right: 2%;border-radius: 3px;border: 1px solid #ccc;'>收起/筛选</button>
      				<button ng-click='clearAttribute()' style='height: 30px;float: right;margin-right: 2%;color: white;border-radius: 3px;border: 1px solid #ccc;background-color: #008d4c;'>清空选项</button>
      			</div>
      			<div id='saixuan' style='height: auto;width: 100%;display: none;'>
      				<div style='height: 30px;width: 100%;border-bottom: 1px dashed #ccc;margin-bottom: 10px; '>
      					<label style='width:80px;margin-right: 30px;'>菜品类别</label>
      					<span ng-repeat='class in classify' style='margin-right: 20px;'>
      						<input type="radio" name='category'  value='{{class.id}}' ng-click='searchAttributeDishes()'/>
      						<span>{{class.name}}</span>
      					</span>
      				</div>
      				<div style='height: 30px;width: 100%;border-bottom: 1px dashed #ccc;margin-bottom: 10px; '>
      					<label style='width:80px;margin-right: 30px;'>制作方法</label>
      					<span ng-repeat='method in methods' style='margin-right: 20px;'>
      						<input type="radio" name='method' value='{{method.id}}'  ng-click='searchAttributeDishes()'/>
      						<span>{{method.name}}</span>
      					</span>
      				</div>
      				<div style='height: 30px;width: 100%;border-bottom: 1px dashed #ccc;margin-bottom: 10px; '>
      					<label style='width:80px;margin-right: 30px;'>口味</label>
      					<span ng-repeat='tast in tastes' style='margin-right: 20px;'>
      						<input type="checkbox" name='tast' value='{{tast.id}}' ng-model="tast.checked" ng-click='searchAttributeDishes()'/>
      						<span>{{tast.name}}</span>
      					</span>
      				</div>
      				<div style='height: 30px;width: 100%;border-bottom: 1px dashed #ccc;margin-bottom: 10px; '>
      					<label style='width:80px;margin-right: 30px;'>颜色</label>
      					<span ng-repeat='color in colors' style='margin-right: 20px;'>
      						<input type="checkbox" name='color' value='{{color.id}}' ng-model="color.checked" ng-click='searchAttributeDishes()'/>
      						<span>{{color.name}}</span>
      					</span>
      				</div>
      				<div style='height: 30px;width: 100%;border-bottom: 1px dashed #ccc;margin-bottom: 10px; '>
      					<label style='width:80px;margin-right: 30px;'>形状</label>
      					<span ng-repeat='shape in shapes' style='margin-right: 20px;'>
      						<input type="checkbox" name='shape' value='{{shape.id}}' ng-model="shape.checked" ng-click='searchAttributeDishes()'/>
      						<span>{{shape.name}}</span>
      					</span>
      				</div>
      			</div>
      			
      		</div>
      		<div class="box" style='width: 96%;height: 300px;margin: 0px 2% 10px;display: inline-block;display: flex;font-size: 16px;'>
				<!--<div style='width: 15%; border: 1px solid #d2d6de;height: 100%;'>
					<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;'>全部类别</div>
					<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
						<div ng-click='getDishesByCategory(c.id)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;cursor: pointer;' ng-repeat='c in classify'>{{c.name}}</div>
					</div>
				</div>-->
				<div style='width: 30%; border: 1px solid #d2d6de;height: 100%;'><!--ng-repeat="m in materialCategorys | unique: 'category_id' "-->
					<!--<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
						<input type="text" ng-model='cardInfor' class='goods' placeholder="菜品查询"/>
					</div>-->
					<div style='width: 100%;height: calc(100% );overflow: auto;'>
						<div ng-hide='m.status == 0' ng-click='cmaterial($event,m.id,m.name,m.unit_name)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;
							line-height: 40px;padding-left: 10%;cursor: pointer;' ng-repeat="m in dishesByOneCategory">
							<p style="display: inline-block;overflow: hidden;width: 70%;text-overflow: ellipsis;white-space: nowrap;">{{m.name}}</p>
							<span style="width: 20%;height: 100%;float: right;">
								<img src='../imgs/right.png' style='width: 20px;'/>
							</span>
						</div>
					</div>
				</div>
				<div style='width: 70%; border: 1px solid #d2d6de;height: 100%;'>
					<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
						<div class='b_header' >菜品名称</div>
						<div class='b_header' >单位</div>
						<div class='b_header' >数量</div>
						<div class='b_header' >操作</div>
					</div>
					<div id='maDataList' style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
						<div class='maDataList_div' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;' ng-repeat='m in maDatas' >
							<div class='b_header maDataList_name' >{{m.name}}</div>
							<div class='b_header' >{{m.unit}}</div>
							<div class='b_header' >
								<input type="number" ng-model='m.count'  style='height: 28px; width: 90%;margin-left: 20px;text-indent: 20px;'/>
							</div>
							<div class='b_header' ><img ng-click='delThis($event,m.name)' src='../imgs/del.png' style='width: 15px;cursor: pointer;margin-left: 10px;'/></div>
						</div>
					</div>
				</div>
				
	      </div>
      </div>
      <div class="modal-footer" style='background-color: #fff;position: relative;'>
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">关闭窗口</button>
        <div ng-show='judgeDate' style='color: red;height: 55px;width: 200px;display: inline-block;position: absolute;left: 30%;line-height: 55px;'>无法编辑当天及之前日期的菜谱</div>
        <button ng-show='judgeDate' type="button" class="btn btn-default btn-lg" >取消发布</button>
        <button ng-show='judgeDate' type="button" class="btn btn-default btn-lg" >确定发布</button>
        <button ng-hide='judgeDate' type="button" class="btn btn-success btn-lg" style='background-color: #f39c12;border: 1px solid #f39c12;' ng-click="cancelPublish()">取消发布</button>
        <button ng-hide='judgeDate' type="button" class="btn btn-success btn-lg" ng-click="checkOut_true()">确定发布</button>
      </div>
    </div>
  </div>
</div>
<!--菜谱复制modal--> 
	<div class="modal fade" id="planCopy" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='width: 40%;height: 100%;margin-top: 100px;padding-bottom: 20px;'>
    <div class="modal-content" style='position: relative;'>
      <div class="modal-header" style='background-color: #3A3F51;color: #fff;'>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">菜谱复制</h4>
      </div>
      <div style='width: 100%;height: 150px;'>
      		<div style='margin: 25px 50px;'>
      			<span >源日期</span>
      			<input readonly id='sourceDay' type="text" style='margin-left: 15px;border: 1px solid #37C8D2;text-align: center;'/>
      		</div>
      		<div style='margin: 25px 50px;'>
      			<span>目标日期</span>
      			<input readonly id='toStratDay' type="text" style='margin-left: 15px;border: 1px solid #37C8D2;width: 25%;text-align: center;'/>
      			<span>-</span>
      			<input readonly id='toEndDay' type="text" style='margin-left: 15px;border: 1px solid #37C8D2;width: 25%;text-align: center;'/>
      		</div>
      		<div class="form-group col-lg-2 col-xs-6 space" style='display: inline-block;width: 200px;vertical-align: middle;position: relative;margin: 5px 48px;'>
										<div style='display: inline-block;'>周末排单</div>
										<div style='display: inline-block;'>
												<input type="checkbox" name='apply_to_saturday' ng-model='apply_to_saturday' />
												<span>周六</span>
										</div>
										<div style='display: inline-block;'>
												<input type="checkbox" name='apply_to_sunday' ng-model='apply_to_sunday' />
												<span>周日</span>
										</div>
			     			 </div>
      </div>
      <div class="modal-footer" style='background-color: #fff;position: relative;'>
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button ng-hide='judgeDate' type="button" class="btn btn-success btn-lg" ng-click="copy_true()">确定</button>
      </div>
    </div>
  </div>
</div>
<!--菜谱核查modal--> 
	<div class="modal fade" id="planCheck" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='width: 40%;height: 100%;margin-top: 100px;padding-bottom: 20px;'>
    <div class="modal-content" style='position: relative;'>
      <div class="modal-header" style='background-color: #3A3F51;color: #fff;'>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">菜谱核查</h4> 
      </div>
      <div style='width: 100%;height: 120px;'>
      		<div style='margin: 25px 50px;'> 
      			<span >指定核查日期</span>
      			<input readonly id='checkDay' type="text" style='margin-left: 15px;border: 1px solid #37C8D2;text-align: center;'/>
      		</div> 
      		<div class="form-group col-lg-2 col-xs-6 space" style='display: inline-block;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
										<div style='display: inline-block;'>指定核查餐别</div>
										<div style='display: inline-block;' ng-repeat='period in periods'>
												<input type="checkbox" name='periodTime' ng-model='period.checked' />
												<span>{{period.period_time_name}}</span>
										</div>
			     			 </div>
      </div>
      <div class="modal-footer" style='background-color: #fff;position: relative;padding: 10px 15px;'>
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal" style='padding: 3px 12px;font-size: 18px;'>取消</button>
        <button ng-hide='judgeDate' type="button" class="btn btn-success btn-lg" ng-click="check_true()" style='padding: 3px 12px;font-size: 18px;'>确定</button>
      </div>
    </div>
  </div>
</div>
<!--核查显示modal--> 
	<div id='checkTemple' style='position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 1500;width: 100%;height: 100%;opacity: 1;display: none;'>
		<div style='width: 700px;max-height: 440px;position: relative;margin:100px auto ;border-radius: 20px;background-color: #3c8dbc;overflow: hidden;'>
			<div style='width: 100%;height: 30px;text-align: center;line-height: 30px;font-size: 18px;font-weight: bold;margin-top: 5px;'>核查结果</div>
			<div style='width: 20px;height: 100%;position: absolute;top:0;right: 0;z-index: 2000;background-color: #3c8dbc;'></div>
			<div style='width: 100%;max-height: 350px;overflow: auto;position: relative;'>
				<div ng-repeat='temple in checkTemples track by $index' style='width: 94%;height: auto;display: inline-block;border: 1px solid #777;margin: 10px 3%;border-radius: 5px;padding-bottom: 10px;'>
						<h4 style='text-align: center;'>日期/餐别：&nbsp;&nbsp;&nbsp;&nbsp;{{temple.selectDay}}&nbsp;&nbsp;&nbsp;&nbsp;{{temple.periodTimeName}}</h4>				
						<div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
								<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>已选菜品:</div>
								<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);height: auto;'>
										<div class='div_span' ng-repeat='item in temple.itemList'>{{item.name}}<span>数量：{{item.count}}</span></div>
								</div>
	     			 </div>
	     			 <div class="form-group col-lg-2 col-xs-6 space" style='height:30px;display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
								<div style='width: 50%;'>
										<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>毛利:</div>
										<div style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>{{temple.profit}}</div>
								</div>
								<div style='width: 50%;'>
										<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>数量:</div>
										<div style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>{{temple.itemCount}}</div>
								</div>
     				 </div>
	     			 <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>主料:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
											<!--<span ng-repeat='main in temple.main'>{{main}}</span>-->
											<!--<span>{{temple.majorNum}}种</span>-->
											<span ng-repeat='major in temple.majorNames track by $index' >{{major}}</span>
									</div>
	     			 </div>
	     			 <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>类别:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
											<span>{{temple.category.length}}种</span>
											<span ng-repeat='category in temple.category'>{{category.name}}</span>
									</div>
	     			 </div> 
	     			 <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>做法:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
										<span>{{temple.cook.length}}种</span>
											<span ng-repeat='cook in temple.cook'>{{cook.name}}</span>
									</div>
	     			 </div> 
	     			  <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>口味:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
										<span>{{temple.taste.length}}种</span>
											<span ng-repeat='taste in temple.taste'>{{taste.name}}</span>
									</div>
	     			 </div>
	     			  <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 80px;font-size: 18px;font-weight: bold;'>颜色:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
										<span>{{temple.color.length}}种</span>
											<span ng-repeat='color in temple.color'>{{color.name}}</span> 
									</div>
	     			 </div> 
	     			 <div class="form-group col-lg-2 col-xs-6 space" style='display: flex;width: 90%;vertical-align: middle;position: relative;margin: 5px 0px 0px 48px;'>
									<div style='display: inline-block;width: 120px;font-size: 18px;font-weight: bold;'>主料辅料比例:</div>
									<div class='mainGoods' style='display: inline-block;width: calc(100% - 90px);font-size: 18px;'>
											<span >{{temple.majorNum}}</span>&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;<span >{{temple.seNum}}</span>  
									</div>
	     			 </div> 
				</div>
			</div>
			 <div style='position: relative;height:60px;'>
	        <button type="button" style='position: absolute;left: 20px;' class="btn btn-default btn-lg pull-left" ng-click="menuEdit_false()">取消操作</button>
	        <button ng-hide='judgeDate' style='position: absolute;right: 20px;' type="button" class="btn btn-success btn-lg" ng-click="menuEdit_true()">继续操作</button>
	      </div>
		</div>
	</div>
<!-- 提示modal 暂时不用，目前直接提示 -->
  <div class="modal fade" id="temp">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	修改模板后，菜谱将重置为所选模板包含的菜肴
        </div>
      </div>
      <div class="modal-footer">
        <button id='temp_false' type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button id='temp_true' type="button" class="btn btn-success btn-lg" >确定</button><!--ng-click=temp_true();-->
      </div>
    </div>
  </div>
</div>
<!-- 取消菜谱计划的发布 -->
  	<div class="modal fade" id="delPlan" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	确定要删除吗？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="del_plan();">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- 菜品重复提示 -->
  	<div class="modal fade" id="confirmSame" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	{{errorM}}是否继续添加？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="sureSame();">确定</button>
      </div>
    </div>
  </div>
</div>
<style>
	.space{
		padding-left:2px;
		padding-right:2px;
	}
	.box{
		border-top:1px solid #d2d6de;
	}
	.pagination{
		margin:0;
	}
	.today{width:5%;height: 50px;text-align: center;line-height: 50px;position: absolute;left:8%;font-size:16px;}
	.timeDistance{width:30%;height: 50px;text-align: center;line-height: 50px;position: absolute;left:40%;font-size:18px;font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;}
	th{font-weight: normal;border: 1px solid #e3eaef ;}
	td{font-weight: normal;border: 1px solid #e3eaef ;}
	.td_div{overflow: auto;word-wrap:break-word;background-color: darkgray;border-color: darkgray;color: white;margin: 3px;
	width: calc(100% - 6px);height: calc(100% - 6px);border-radius:10px;overflow:hidden;cursor: pointer;}
	.dropdown-menu td{border: none;}
	.classify{width: calc(100% - 30px);margin: 15px 15px 0px 15px;height: 50px;}
	.classify_div{display:inline-block;width: 50%;height: 50px;border-radius: 5px 5px 0px 0px;line-height: 50px;text-align: center;font-weight: bold;border-bottom: 1px solid #CCCCCC;}
	.div_active{border-bottom:none !important;border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;color:#23b7e5;}
	
	.row1{    display: flex;margin-bottom: -1px;border: 1px solid #ddd;align-items: center;
   			 height: 45px;padding-left: 12px;padding-right: 12px;}
   	.row1 > label {  flex: 0 0 84px;text-align: right;padding-right: 12px;}
   	.row1 textarea { flex: auto;border: none;outline: none;}
   	textarea { padding: 10px 10px;resize: none;}
   	.row1 select { flex: auto; border: none; outline: none;}
   	.row1 select { padding-left: 5px;}
   	.row1 input { flex: auto; border: none; outline: none;    padding-left: 10px;}
   	.backcolor{background-color: #ECF0F5;}
   	.space{padding-left:2px;padding-right:2px;}
	.box{border-top:1px solid #d2d6de;}
	.pagination{margin:0;}
	.odd{background-color: #f9f9f9 !important;}
	.even{background-color: transparent !important;}
	.btn{    padding: 10px 12px;}
	.goods{    height: 30px;margin: 6px 10%;line-height: 20px;padding: 5px;width: 80%;border: 1px solid #ccc;border-radius: 3px;}
	.primary-color { color: #37C8D2;}
	.b_header{width: 24%;height: 20px;line-height: 40px;text-align: center;display: inline-block;}
	.maDataList_div_input{height: 28px; width: 90%;  margin-left: 20px;}
	ul,li{list-style-type: none;list-style: none;margin: 0;padding: 0;}
	.myul{flex: auto;display: flex;flex-direction: row;width: 100%;height: 90%;background: #F5F5F5;}
	.myul>li {display: flex;flex-direction: column;flex: 1;border-right: 2px solid #fff;border-top: 2px solid #fff;}
	.myul>li>label {color: #595959;}
	.myul label {line-height: 40px;text-align: center;}
	.myul>li ul {flex: auto;display: flex;flex-direction: column;}
	.myul>li ul li {border-top: 2px solid #fff;line-height: 30px;flex: 1 auto;height: 40px;min-width: 50px;overFlow: hidden;padding: 0 5px;}
	.myul>li ul li:nth-child(4n+1) {background: rgb(225,235,250);color: #327AD5;}
	.myul>li ul li:nth-child(4n+2) {background: rgb(250,225,225);color: #E63E4F;}
	.myul>li ul li:nth-child(4n+3) {background: rgb(170,230,235);color: #27A4B0;}
	.myul>li ul li:nth-child(4n+4) {background: rgb(250,230,145);color: #AD8F16;}
	.myul>li ul li {position: relative;}
	.myul>li ul li label {line-height: 20px;}
	.dateActive{background-color: #ddd !important;}
	.div_span{width:50%;display: inline-block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;padding: 0px 10px;}
	.mainGoods span{padding: 0px 10px;}
	td {   
        border: solid #000 1px;   
    }   
</style> 

<script>
	$(".timepicker").timepicker({
		showInputs: false,
		showMeridian:false	
	});
	//日历选择
			$('#datepicker').datepicker({
			  autoclose: true
			});
</script>